<template>
	<view>
		<view class="GoTop" @click="clkGoTop()" v-if="isShow">
			<image style="width: 100%;" src="/static/images/GoTop.png" mode="widthFix"></image>
		</view>
	</view>
</template>

<script>
	export default {
		name:"go-top",
		props:{
			isShow:{
				type: [String, Number, Boolean],
				default: false
			}
		},
		data() {
			return {
			};
		},
		methods:{
			clkGoTop(){//回到顶部
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 300
				});
			},
		}
	}
</script>

<style scoped lang="scss">
.GoTop{
		position: fixed;
		bottom: 200rpx;
		right: 40rpx;
		background-color: rgba(200,200,200,0.6);
		width: 80rpx;
		height: 80rpx;
		border-radius: 50%;
	}
</style>